<template>
  <v-app id="app">
    <!-- 导航栏 -->
    <TopNavBar></TopNavBar>
    <!-- 侧边导航栏 -->
    <SideNavBar></SideNavBar>
    <!-- 内容 -->
    <v-content>
      <router-view :key="$route.fullPath" />
    </v-content>
    <!-- 页脚 -->
    <Footer></Footer>
    <!-- 返回顶部 -->
    <BackTop></BackTop>
    <!-- 搜索模态框 -->
    <searchModel></searchModel>
    <!-- 登录模态框 -->
    <LoginModel></LoginModel>
    <!-- 扫脸登录   -->
    <LoginModel2></LoginModel2>
    <!-- 注册模态框 -->
    <RegisterModel></RegisterModel>
    <!--    手机号注册模态框-->
    <RegisterMobileModel></RegisterMobileModel>
    <!-- 忘记密码模态框 -->
    <ForgetModel></ForgetModel>
    <!-- 绑定邮箱模态框 -->
    <EmailModel></EmailModel>
    <!-- 音乐播放器 -->
<!--    <Player></Player>-->
    <!-- 聊天室 -->
    <ChatRoom></ChatRoom>
  </v-app>
</template>

<script>

import TopNavBar from "./components/layout/TopNavBar";
import SideNavBar from "./components/layout/SideNavBar";
import Footer from "./components/layout/Footer";
import BackTop from "./components/BackTop";
import searchModel from "./components/model/SearchModel";
import LoginModel from "./components/model/LoginModel";
import LoginModel2 from "./components/model/LoginModel2";
import RegisterModel from "./components/model/RegisterModel";
import RegisterMobileModel from "./components/model/RegisterMobileModel";
import ForgetModel from "./components/model/ForgetModel";
import EmailModel from "./components/model/EmailModel";
// import Player from "zw-player";
import Player from "./components/zw-player/player.vue";
import ChatRoom from "./components/ChatRoom";
export default {
  components: {
    TopNavBar,
    // Player,
    SideNavBar,
    Footer,
    BackTop,
    searchModel,
    LoginModel,
    LoginModel2,
    RegisterModel,
    RegisterMobileModel,
    ForgetModel,
    EmailModel,
    ChatRoom
  },
    created(){
        let user = sessionStorage.getItem("user")
        // let user = localStorage.getItem("user")
        if (!user) {
            this.$router.push({
                path: '/',
                query: ''
            })
        }
    }
};
</script>
